package com.learn;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

/**
 * 无任何配置的简单测试
 * @author Romanceling
 *
 */
//@Component
public class RedisSimpleTest {

	private RedisTemplate redisTemplate;
	
	@Autowired
	public RedisSimpleTest(RedisTemplate redisTemplate){
		 this.redisTemplate = redisTemplate;
	}
	
	public void show(){
		redisTemplate.opsForValue().set("test1", "sssssssss");
		System.out.println(redisTemplate.opsForValue().get("test1"));
	}
	
}